package me.send.produce.client.controller;

import java.util.Map;

import me.send.business.base.ErrorEntity;
import me.send.business.base.Page;
import me.send.business.service.pojo.Comment;
import me.send.business.service.service.CommentService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = "comment")
public class CommentController {

	@Autowired
	private CommentService commentService;

	@RequestMapping(value = "list/page/orderid")
	@ResponseBody
	public Map<String, Object> list_page_orderid(String devicenumber,
			Integer orderid, Page page) {
		return commentService.list_page_orderid(devicenumber, orderid, page);
	}
	
	@RequestMapping(value="comment/save")
	@ResponseBody
	public ErrorEntity comment_save(String devicenumber,Comment comment){
		return commentService.comment_save(devicenumber, comment);
	}
}